package com.example.back.mapper;

import com.example.back.entity.Relations;
import org.apache.ibatis.annotations.*;

import java.util.ArrayList;
@Mapper
public interface RelationMapper {
    @Insert("insert into relations(fanId,userId,time,notes) values(#{fanId},#{userId},#{time},#{notes})")
    int addRelation(Relations relations);

    @SelectProvider(type = relationProvider.class, method = "queryRelation")
    ArrayList<Relations> queryUserRelation(Relations relations);

    @Delete("delete from relations where id=#{id}")
    int deleteRelation(Integer id);
}
